﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Medianamik.Core;

namespace Medianamik.UI.ImportExportManagement
{
    public class Medianamik2DataSource : DataSource<NodeType, NodeTypeProperty, NodeInstance, NodeProperty>
    {
        public override IEnumerable<NodeType> GetRecordTypes()
        {
            //TODO : Many-to-many ???
            return NodeTypeManager.GetAllTypes(false).AsEnumerable();
        }

        public override IEnumerable<NodeInstance> GetRecordsByType(IEnumerable<RecordType> recordTypes)
        {
            throw new NotImplementedException();
        }

        public override IEnumerable<NodeTypeProperty> GetRecordTypePropertiesByType(NodeType type)
        {
            return type.Properties;
        }

        public override IEnumerable<NodeProperty> GetRecordPropertiesByRecord(NodeInstance record)
        {
            throw new NotImplementedException();
        }
    }
}
